﻿<UserControl x:Class="DiscoveryLogic.UI.Layouts.Controls.PieChart"
        xmlns="http://schemas.microsoft.com/client/2007" 
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"   
        xmlns:wc="clr-namespace:DiscoveryLogic.UI.Layouts.WrappedControls"
             xmlns:sys="clr-namespace:System;assembly=mscorlib"
        >
    
    <UserControl.Resources>
        <sys:String x:Key="Res_SetContribution">Set Contribution</sys:String>
        <sys:String x:Key="Res_TransferFunds">Transfer Funds</sys:String>
        <sys:String x:Key="Res_ChangeContribution">Change Contribution</sys:String>
    </UserControl.Resources>

    <Canvas x:Name="PieChartCanvas" Background="Transparent">      
        
        
        
        <Canvas x:Name="AllocationSliderCanvas" Canvas.Left="0" Canvas.Top="0" Background="Transparent" Canvas.ZIndex="0" Height="200" Width="200">

            <Canvas x:Name="AllocationPopup" Width="180" Height="60" Canvas.Left="318.136" Canvas.Top="210.412" Opacity="1">

                <Canvas x:Name="AllocationPopupElements" Width="180" Height="60" Canvas.Left="-16.025" Canvas.Top="10">



                    <Rectangle Width="231.166" Height="69.17" RadiusX="10" RadiusY="10" Opacity="0.25" StrokeThickness="2" Canvas.Left="17.84" Canvas.Top="-0.508">
                        <Rectangle.OpacityMask>
                            <LinearGradientBrush EndPoint="0.5,0" StartPoint="0.5,1">
                                <GradientStop Color="#00747045" Offset="0"/>
                                <GradientStop Color="#00747045" Offset="1"/>
                                <GradientStop Color="#FF747045" Offset="0.034"/>
                                <GradientStop Color="#FF747045" Offset="0.832"/>
                            </LinearGradientBrush>
                        </Rectangle.OpacityMask>
                        <Rectangle.Fill>
                            <LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5">
                                <GradientStop Color="#001D62AF" Offset="0"/>
                                <GradientStop Color="#001D62AF" Offset="1"/>
                                <GradientStop Color="#FF1D62AF" Offset="0.06"/>
                                <GradientStop Color="#FF1D62AF" Offset="0.94"/>
                            </LinearGradientBrush>
                        </Rectangle.Fill>
                    </Rectangle>



                    <Rectangle RenderTransformOrigin="0.5,0.5" Width="222.667" Height="68" RadiusX="6" RadiusY="6" Opacity="1" StrokeThickness="2" Canvas.Left="15.72" Canvas.Top="-10.015" Fill="#D7FAFAFA">
                        <Rectangle.RenderTransform>
                            <TransformGroup>
                                <ScaleTransform ScaleX="1" ScaleY="1"/>
                                <SkewTransform AngleX="0" AngleY="0"/>
                                <RotateTransform Angle="0"/>
                                <TranslateTransform X="0" Y="0"/>
                            </TransformGroup>
                        </Rectangle.RenderTransform>
                    </Rectangle>



                    <Rectangle RenderTransformOrigin="0.5,0.5" Width="222.667" Height="68" RadiusX="3" RadiusY="3" Opacity="1" StrokeThickness="2" Canvas.Left="15.72" Canvas.Top="-10.015" Fill="#601D62AF">
                        <Rectangle.RenderTransform>
                            <TransformGroup>
                                <ScaleTransform ScaleX="1" ScaleY="1"/>
                                <SkewTransform AngleX="0" AngleY="0"/>
                                <RotateTransform Angle="0"/>
                                <TranslateTransform X="0" Y="0"/>
                            </TransformGroup>
                        </Rectangle.RenderTransform>
                        <Rectangle.Stroke>
                            <LinearGradientBrush EndPoint="0.585,-0.084" StartPoint="0.713,1.01">
                                <GradientStop Color="#FF072F2F" Offset="0.005"/>
                                <GradientStop Color="#FDFFFFFF" Offset="1"/>
                            </LinearGradientBrush>
                        </Rectangle.Stroke>
                    </Rectangle>



                    <TextBlock x:Name="AllocationPopupLabel" Width="133.925" Height="17.129" TextWrapping="Wrap" FontFamily="Trebuchet MS" FontSize="14" Foreground="#FF1D62AF" Text="Change Contribution" Canvas.Left="22.574" Canvas.Top="-3.225"/>
	
	

				
	
	

				<Ellipse Fill="#FF002145" Opacity="1" Width="32.992" Height="25.922" StrokeThickness="1" Canvas.Left="187.864" Canvas.Top="-7.056"/>
				<Ellipse Opacity="1" Width="32.992" Height="25.922" StrokeThickness="1" Canvas.Left="187.864" Canvas.Top="-9.413">
					<Ellipse.Fill>
						<RadialGradientBrush MappingMode="RelativeToBoundingBox" Center="1.771,1.436" GradientOrigin="1.84,1.47" RadiusX="0.78" RadiusY="0.78">
							<RadialGradientBrush.RelativeTransform>
								<TransformGroup>
									<ScaleTransform CenterX="1.771" CenterY="1.436" ScaleX="1.936" ScaleY="1.48"/>
									<SkewTransform AngleX="0" AngleY="0" CenterX="1.771" CenterY="1.436"/>
									<RotateTransform Angle="40.596" CenterX="1.771" CenterY="1.436"/>
									<TranslateTransform X="-0.988" Y="-0.712"/>
								</TransformGroup>
							</RadialGradientBrush.RelativeTransform>
							<GradientStop Color="#FFB2DAFF" Offset="0.00365"/>
							<GradientStop Color="#FF72B3F5" Offset="0.215537"/>
							<GradientStop Color="#FF1B60AC" Offset="0.397"/>
							<GradientStop Color="#FF6BB2F5" Offset="0.576"/>
							<GradientStop Color="#FFE9F5FF" Offset="0.612"/>
							<GradientStop Color="#FF0D4887" Offset="0.487"/>
						</RadialGradientBrush>
					</Ellipse.Fill>
				</Ellipse>
				<Path Width="17.052" Height="18.144" Fill="#FF002145" Stretch="Fill" StrokeThickness="1" Canvas.Left="204.302" Canvas.Top="-0.157" Data="M180.54874,1.1077744 L182.49523,10.87395 182.49523,12.301726 C182.49523,12.301726 186.02771,12.265588 187.80503,10.798065 191.02468,8.1396184 191.17731,6.8979701 191.17731,6.8979701 L191.39741,4.6719802 z" RenderTransformOrigin="0.5,0.5">
					<Path.RenderTransform>
						<TransformGroup>
							<ScaleTransform ScaleX="1" ScaleY="1"/>
							<SkewTransform AngleX="0" AngleY="0"/>
							<RotateTransform Angle="-4.315"/>
							<TranslateTransform X="0.010471414844931637" Y="-0.028046684818025192"/>
						</TransformGroup>
					</Path.RenderTransform>
				</Path>
				<Path Width="17.084" Height="17.828" Fill="#FFFFFFFF" Stretch="Fill" StrokeThickness="1" Canvas.Left="204.478" Canvas.Top="1.45" Data="M180.989,1.712 L183.739,11.212 183.739,12.639776 C183.739,12.639776 186.02771,12.265588 187.80503,10.798065 191.02468,8.1396184 191.17731,6.8979701 191.17731,6.8979701 L191.17691,5.3090427 z"/>
	
	            <TextBlock x:Name="SliderLabel" Width="16.095" Height="10.276" FontFamily="Trebuchet MS" FontSize="9" Foreground="#FF555555" Text="0 %" Canvas.Top="17" Canvas.Left="35" Opacity="1"/>
                <wc:Slider x:Name="AllocationSlider" Width="140" Canvas.Top="30" Canvas.Left="30" ValueChanged="OnAllocationSliderMoving" />
			</Canvas>
                <!-- Confirm button -->
                <Canvas x:Name="AllocationConfirmButton" Width="23" Height="23" Canvas.Left="195" Canvas.Top="39.343" RenderTransformOrigin="0.5,0.5"
                        MouseLeftButtonUp="OnAllocationConfirmButtonClick">
                    <Canvas.RenderTransform>
                        <TransformGroup>
                            <ScaleTransform ScaleX="0.9" ScaleY="0.9"/>
                            <SkewTransform AngleX="0" AngleY="0"/>
                            <RotateTransform Angle="0"/>
                            <TranslateTransform X="0" Y="0"/>
                        </TransformGroup>
                    </Canvas.RenderTransform>
                    <Ellipse Width="23" Height="23" StrokeThickness="1">
                        <Ellipse.Fill>
                            <RadialGradientBrush GradientOrigin="0.5,0.717">
                                <RadialGradientBrush.RelativeTransform>
                                    <TransformGroup>
                                        <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="2.541" ScaleY="1.227"/>
                                        <SkewTransform AngleX="0" AngleY="0" CenterX="0.5" CenterY="0.5"/>
                                        <RotateTransform Angle="0" CenterX="0.5" CenterY="0.5"/>
                                        <TranslateTransform X="0.001" Y="0.11"/>
                                    </TransformGroup>
                                </RadialGradientBrush.RelativeTransform>
                                <GradientStop Color="#FF1D62AF" Offset="0.356"/>
                                <GradientStop Color="#FF072F2F" Offset="1"/>
                                <GradientStop Color="#FF74B6FF" Offset="0"/>
                            </RadialGradientBrush>
                        </Ellipse.Fill>
                        <Ellipse.Stroke>
                            <LinearGradientBrush EndPoint="0.505,1.012" StartPoint="0.522,0.239">
                                <GradientStop Color="#FF072F2F" Offset="0"/>
                                <GradientStop Color="#FF1D62AF" Offset="0.591"/>
                                <GradientStop Color="#FF74B6FF" Offset="1"/>
                            </LinearGradientBrush>
                        </Ellipse.Stroke>
                    </Ellipse>
                    <Ellipse Width="23" Height="23" StrokeThickness="1">
                        <Ellipse.Fill>
                            <RadialGradientBrush GradientOrigin="0.503,0.59">
                                <RadialGradientBrush.RelativeTransform>
                                    <TransformGroup>
                                        <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.006" ScaleY="0.709"/>
                                        <SkewTransform AngleX="0" AngleY="0" CenterX="0.5" CenterY="0.5"/>
                                        <RotateTransform Angle="180" CenterX="0.5" CenterY="0.5"/>
                                        <TranslateTransform X="-0.002" Y="-0.12"/>
                                    </TransformGroup>
                                </RadialGradientBrush.RelativeTransform>
                                <GradientStop Color="#0074B6FF" Offset="0.606"/>
                                <GradientStop Color="#AF74B6FF" Offset="0.019"/>
                            </RadialGradientBrush>
                        </Ellipse.Fill>
                    </Ellipse>
                    <Path Width="20" Height="12.417" Stretch="Fill" StrokeThickness="1" Canvas.Left="1.5" Canvas.Top="0.931" Data="M23,11.5 C23,17.851275 20.5,11.332844 11.5,11.332844 2.5,11.332844 0,17.851275 0,11.5 0,5.1487254 5.1487254,0 11.5,0 17.851275,0 23,5.1487254 23,11.5 z">
                        <Path.Fill>
                            <RadialGradientBrush GradientOrigin="0.5,0.717">
                                <RadialGradientBrush.RelativeTransform>
                                    <TransformGroup>
                                        <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.412" ScaleY="1.473"/>
                                        <SkewTransform AngleX="0" AngleY="0" CenterX="0.5" CenterY="0.5"/>
                                        <RotateTransform Angle="0" CenterX="0.5" CenterY="0.5"/>
                                        <TranslateTransform X="0.001" Y="0.228"/>
                                    </TransformGroup>
                                </RadialGradientBrush.RelativeTransform>
                                <GradientStop Color="#E9FFFFFF" Offset="1"/>
                                <GradientStop Color="#00FFFFFF" Offset="0.337"/>
                            </RadialGradientBrush>
                        </Path.Fill>
                    </Path>
                    <Path Width="13.667" Height="11.333" Stretch="Fill" Stroke="#FFFFFFFF" StrokeEndLineCap="Round" StrokeLineJoin="Round" StrokeStartLineCap="Round" StrokeThickness="3" Canvas.Left="5.839" Canvas.Top="5.578" Data="M5.5589205,11.673762 L9.1864327,16.912304 18.707463,6.4352199"/>
                </Canvas>
                <!-- Cancel button -->
                <Canvas x:Name="AllocationCancelButton" Width="23" Height="23" Canvas.Left="165" Canvas.Top="39.343" RenderTransformOrigin="0.5,0.5"
                        MouseLeftButtonUp="OnAllocationCancelButtonClick">
                    <Canvas.RenderTransform>
                        <TransformGroup>
                            <ScaleTransform ScaleX="0.9" ScaleY="0.9"/>
                            <SkewTransform AngleX="0" AngleY="0"/>
                            <RotateTransform Angle="0"/>
                            <TranslateTransform X="0" Y="0"/>
                        </TransformGroup>
                    </Canvas.RenderTransform>
                    <Ellipse Width="23" Height="23" StrokeThickness="1">
                        <Ellipse.Fill>
                            <RadialGradientBrush GradientOrigin="0.5,0.717">
                                <RadialGradientBrush.RelativeTransform>
                                    <TransformGroup>
                                        <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="2.541" ScaleY="1.227"/>
                                        <SkewTransform AngleX="0" AngleY="0" CenterX="0.5" CenterY="0.5"/>
                                        <RotateTransform Angle="0" CenterX="0.5" CenterY="0.5"/>
                                        <TranslateTransform X="0.001" Y="0.11"/>
                                    </TransformGroup>
                                </RadialGradientBrush.RelativeTransform>
                                <GradientStop Color="#FF39516C" Offset="0.356"/>
                                <GradientStop Color="#FF0F1E1E" Offset="1"/>
                                <GradientStop Color="#FFB4C6DA" Offset="0"/>
                            </RadialGradientBrush>
                        </Ellipse.Fill>
                        <Ellipse.Stroke>
                            <LinearGradientBrush EndPoint="0.505,1.012" StartPoint="0.522,0.239">
                                <GradientStop Color="#FF000000" Offset="0"/>
                                <GradientStop Color="#FF4A5561" Offset="0.591"/>
                                <GradientStop Color="#FFCAD5E2" Offset="1"/>
                            </LinearGradientBrush>
                        </Ellipse.Stroke>
                    </Ellipse>
                    <Ellipse Width="23" Height="23" StrokeThickness="1">
                        <Ellipse.Fill>
                            <RadialGradientBrush GradientOrigin="0.503,0.59">
                                <RadialGradientBrush.RelativeTransform>
                                    <TransformGroup>
                                        <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.006" ScaleY="0.709"/>
                                        <SkewTransform AngleX="0" AngleY="0" CenterX="0.5" CenterY="0.5"/>
                                        <RotateTransform Angle="180" CenterX="0.5" CenterY="0.5"/>
                                        <TranslateTransform X="-0.002" Y="-0.12"/>
                                    </TransformGroup>
                                </RadialGradientBrush.RelativeTransform>
                                <GradientStop Color="#0074B6FF" Offset="0.606"/>
                                <GradientStop Color="#AFBBBBBB" Offset="0.019"/>
                            </RadialGradientBrush>
                        </Ellipse.Fill>
                    </Ellipse>
                    <Path Width="20" Height="12.417" Stretch="Fill" StrokeThickness="1" Canvas.Left="1.5" Canvas.Top="0.931" Data="M23,11.5 C23,17.851275 20.5,11.332844 11.5,11.332844 2.5,11.332844 0,17.851275 0,11.5 0,5.1487254 5.1487254,0 11.5,0 17.851275,0 23,5.1487254 23,11.5 z">
                        <Path.Fill>
                            <RadialGradientBrush GradientOrigin="0.5,0.717">
                                <RadialGradientBrush.RelativeTransform>
                                    <TransformGroup>
                                        <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.412" ScaleY="1.473"/>
                                        <SkewTransform AngleX="0" AngleY="0" CenterX="0.5" CenterY="0.5"/>
                                        <RotateTransform Angle="0" CenterX="0.5" CenterY="0.5"/>
                                        <TranslateTransform X="0.001" Y="0.228"/>
                                    </TransformGroup>
                                </RadialGradientBrush.RelativeTransform>
                                <GradientStop Color="#E9FFFFFF" Offset="1"/>
                                <GradientStop Color="#00FFFFFF" Offset="0.337"/>
                            </RadialGradientBrush>
                        </Path.Fill>
                    </Path>
                    <Path Width="11" Height="11.333" Fill="#FFFFFFFF" Stretch="Fill" Stroke="#FFFFFFFF" StrokeEndLineCap="Round" StrokeLineJoin="Round" StrokeStartLineCap="Round" StrokeThickness="2.5" Canvas.Left="6.333" Canvas.Top="5.328" Data="M0.50000001,0.50000002 L9.5000045,8.832667"/>
                    <Path Width="10.633" Height="10.523" Fill="#FFFFFFFF" Stretch="Fill" Stroke="#FFFFFFFF" StrokeEndLineCap="Round" StrokeLineJoin="Round" StrokeStartLineCap="Round" StrokeThickness="2.5" Canvas.Left="6.333" Canvas.Top="5.328" Data="M9.166331,0.50000001 L0.50000001,8.1663348"/>
                </Canvas>
            </Canvas>

        </Canvas>

        <!--
        <Ellipse Opacity="0.4" x:Name="PieChartGloss" Width="196" Height="196" StrokeEndLineCap="Flat" StrokeStartLineCap="Flat" StrokeThickness="1" Canvas.ZIndex="10">
            <Ellipse.OpacityMask>
                <RadialGradientBrush>
                    <RadialGradientBrush.RelativeTransform>
                        <TransformGroup>
                            <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.91" ScaleY="1.145"/>
                            <SkewTransform AngleX="0" AngleY="0" CenterX="0.5" CenterY="0.5"/>
                            <RotateTransform Angle="3.106" CenterX="0.5" CenterY="0.5"/>
                            <TranslateTransform X="0.033" Y="0.085"/>
                        </TransformGroup>
                    </RadialGradientBrush.RelativeTransform>
                    <GradientStop Color="#00000000" Offset="0.529"/>
                    <GradientStop Color="#FFFFFFFF" Offset="1"/>
                </RadialGradientBrush>
            </Ellipse.OpacityMask>
            <Ellipse.Fill>
                <RadialGradientBrush>
                    <GradientStop Color="#FFFFFFFF" Offset="0.951"/>
                    <GradientStop Color="#19FFFFFF" Offset="0.996"/>
                    <GradientStop Color="#00FFFFFF" Offset="0.596"/>
                    <GradientStop Color="#ACFFFFFF" Offset="0.72"/>
                </RadialGradientBrush>
            </Ellipse.Fill>
        </Ellipse>
        -->        
    </Canvas>

</UserControl>
